//
// Created by 11510 on 2024/6/20.
//
#include <iostream>
#include <string>

using namespace std;

template<class T>
T add(T t1, T t2) {
    return t1 + t2;
}

void test0() {
    int i1 = 3, i2 = 4;
    long l1 = 5, l2 = 6;
    string s1 = "goodbye", s2 = "world";
    /**
     * 实例化了三个函数
     */
    cout << "add(i1,i2): " << add(i1, i2) << endl;
    cout << "add(l1,l2): " << add(l1, l2) << endl;
    cout << "add(s1,s2): " << add(s1, s2) << endl;

    cout << add<int>(1.8, 2.2) << endl;
}


int main(void){
    test0();
}